-- GENERATED SPELL FOR [Dragonblight Mage Hunter] --


function spell0_32572(pUnit, Event) --@Arcane Reflection,Self--
pUnit:FullCastSpellOnTarget(51766,pUnit)
pUnit:RegisterEvent('Sorts_32572', 7000, 1)
end

function spell1_32572(pUnit, Event) --@Fire Reflection,Self--
pUnit:FullCastSpellOnTarget(51758,pUnit)
pUnit:RegisterEvent('Sorts_32572', 7000, 1)
end

function spell2_32572(pUnit, Event) --@Frost Reflection,Self--
pUnit:FullCastSpellOnTarget(51763,pUnit)
pUnit:RegisterEvent('Sorts_32572', 7000, 1)
end

function spell3_32572(pUnit, Event) --@Shadow Reflection,Self--
pUnit:FullCastSpellOnTarget(51764,pUnit)
pUnit:RegisterEvent('Sorts_32572', 7000, 1)
end

function Sorts_32572(pUnit, Event)
local choix_sorts_32572 = math.random(0, 3)
if choix_sorts_32572 == 0 then
pUnit:RegisterEvent('spell0_32572', 1, 1)
end
if choix_sorts_32572 == 1 then
pUnit:RegisterEvent('spell1_32572', 1, 1)
end
if choix_sorts_32572 == 2 then
pUnit:RegisterEvent('spell2_32572', 1, 1)
end
if choix_sorts_32572 == 3 then
pUnit:RegisterEvent('spell3_32572', 1, 1)
end
end

function mob32572_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32572', math.random(1500, 3000), 1)
end

function mob32572_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32572_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32572_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32572, 1, 'mob32572_Action')
RegisterUnitEvent(32572, 2, 'mob32572_Leave')
RegisterUnitEvent(32572, 3, 'mob32572_Kill')
RegisterUnitEvent(32572, 4, 'mob32572_Die')
